<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
	window.onload = function(){
		// 全局变量:自动称为window对象的属性
		// window.num
		// window.res
		var num = 100;
		var res = 10;

		var obj = {name:'xxx',age:18}
		delete obj.name;

		mybook = 'h5';
	}

	var num = 100;
	delete window.num;

	myname = 'laoxie';


	// 在window对象下的方法，我们称之位全局方法
	// 函数
	alert(myname)
		
	</script>
</head>
<body>
	
</body>
</html>